package com.mall.ibatis.bean;

import java.io.Serializable;
import java.util.List;

@SuppressWarnings("serial")
public class Frame implements Serializable,IFormat
{
	/*
	 * SMFID VARCHAR2(10) not null, SMFNAME VARCHAR2(40), SMFTYPE CHAR(1),
	 * SMFPID VARCHAR2(10), SMFCLASS NUMBER, SMFFLAG CHAR(1), SMFSTATUS CHAR(1),
	 * SMFMEMO VARCHAR2(200)
	 */

	private String frameID;
	private String frameName;
	private String frameType;
	private String frameParentID;
	private String frameClass;
	private String frameFlag;
	private String frameStatus;
	private String frameMemo;
	
	//通过定义长度属性来保证树形菜单的缩进层次
	private int frameLength;
	
	public int getFrameLength() {
		return frameID.length() == 1 ? 0 : frameID.length();
	}

	public void setFrameLength(int frameLength) {
		this.frameLength = frameLength;
	}

	private List<FrameParameter> frameParameterList;
	
	private String isLast; /*是否是最后一个结点，“Y”表示是*/

	public String getFrameID()
	{
		return frameID;
	}

	public void setFrameID(String frameID)
	{
		this.frameID = frameID;
	}

	public String getFrameName()
	{
		return frameName;
	}

	public void setFrameName(String frameName)
	{
		this.frameName = frameName;
	}

	public String getFrameType()
	{
		return frameType;
	}

	public void setFrameType(String frameType)
	{
		this.frameType = frameType;
	}

	public String getFrameParentID()
	{
		return frameParentID;
	}

	public void setFrameParentID(String frameParentID)
	{
		this.frameParentID = frameParentID;
	}

	public String getFrameClass()
	{
		return frameClass;
	}

	public void setFrameClass(String frameClass)
	{
		this.frameClass = frameClass;
	}

	public String getFrameFlag()
	{
		return frameFlag;
	}

	public void setFrameFlag(String frameFlag)
	{
		this.frameFlag = frameFlag;
	}

	public String getFrameStatus()
	{
		return frameStatus;
	}

	public void setFrameStatus(String frameStatus)
	{
		this.frameStatus = frameStatus;
	}

	public String getFrameMemo()
	{
		return frameMemo;
	}

	public void setFrameMemo(String frameMemo)
	{
		this.frameMemo = frameMemo;
	}

	public String getIsLast()
	{
		return isLast;
	}

	public void setIsLast(String isLast)
	{
		this.isLast = isLast;
	}

	public List<FrameParameter> getFrameParameterList()
	{
		return frameParameterList;
	}

	public void setFrameParameterList(List<FrameParameter> frameParameterList)
	{
		this.frameParameterList = frameParameterList;
	}
	
	public String toKeyValue() {
		// TODO Auto-generated method stub
		return this.frameID + ":" + this.frameName;
	}

	public String optionText() {
		// TODO Auto-generated method stub
		return  this.frameName;
	}

	public String optionTitle() {
		// TODO Auto-generated method stub
		return  this.frameMemo;
	}

	public String optionValue() {
		// TODO Auto-generated method stub
		return  this.frameID;
	}
}
